/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { responseSuccess } from '../utils';
import Mock from 'mockjs';

export default {
  //超限模版审核
  'POST /Shield/getList': (req: Request, res: Response) => {
    const data = Mock.mock({
      'list|1-10': [
        {
          cm_id: '@id()',
          cm_phone: '@id()',
          create_time: '@now()',
          id: '@id()',
          kb_id: '@id()',
          operator: '@id()',
          'user_type|1': ['s', 'yz', '', null],
          reason: '@word',
        },
      ],
    });
    const result = {
      code: 0,
      msg: 'success',
      data: data.list,
    };
    return res.json(result);
  },
  'POST /Shield/untied': (req: Request, res: Response) => responseSuccess(req, res),

  //拉黑快递员/驿站
  'POST /Shield/getUsers': (req: Request, res: Response) => {
    const data = Mock.mock({
      'list|1-10': [
        {
          cm_id: '@id()',
          cm_name: '@canme()',
          phone: '@id()',
          create_time: '@now()',
          id: '@id()',
          kb_id: '@id()',
          operator: '@id()',
          'account_type|1': ['yz', 'kdy', '', null],
          'is_black|1': [0, 1],
          'is_deduct_not_send|1': [0, 1],
          note: '@cname()',
          'is_sms_white|1': [0, 1],
        },
      ],
    });
    const result = {
      code: 0,
      msg: 'success',
      data: data.list,
    };
    return res.json(result);
  },
  'POST /Shield/switchWhite': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /Shield/addSMSBlack': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /Shield/removeSMSBlack': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /Shield/adminBlack': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /Shield/adminUntied': (req: Request, res: Response) => responseSuccess(req, res),
};
